# P10
# a+b+c=1000 and  a ** 2 + b ** 2 == c ** 2 , 列出所有可能的大于等于零整数组合

def main():
    i = 0
    for a in range(1000):
        for b in range(1000):
            c = 1000 - a - b
            if a + b + c == 1000 and a ** 2 + b ** 2 == c ** 2:
                i += 1
                print(i, a, b, c)


if __name__ == '__main__':
    main()
